package com.muyu.payment.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.muyu.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 充值订单实体类
 *
 * @author muyu
 * @date 2025-01-27
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("recharge_order")
@Schema(description = "充值订单")
public class RechargeOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Long id;

    /**
     * 充值订单号
     */
    @Schema(description = "充值订单号")
    private String orderNo;

    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    private Long userId;

    /**
     * 用户账号
     */
    @Schema(description = "用户账号")
    private String userName;

    /**
     * 充值金额
     */
    @Schema(description = "充值金额")
    private BigDecimal amount;

    /**
     * 支付渠道（1:支付宝 2:微信 3:银行卡）
     */
    @Schema(description = "支付渠道（1:支付宝 2:微信 3:银行卡）")
    private Integer payChannel;

    /**
     * 订单状态（1:待支付 2:支付成功 3:支付失败 4:已取消））
     */
    @Schema(description = "订单状态（1:待支付 2:支付成功 3:支付失败 4:已取消）")
    private Integer orderStatus;

    /**
     * 第三方交易号
     */
    @Schema(description = "第三方交易号")
    private String thirdPartyTradeNo;

    /**
     * 支付时间
     */
    @Schema(description = "支付时间")
    private Date payTime;

    /**
     * 订单过期时间
     */
    @Schema(description = "订单过期时间")
    private Date expireTime;

    /**
     * 回调地址
     */
    @Schema(description = "回调地址")
    private String notifyUrl;

    /**
     * 返回地址
     */
    @Schema(description = "返回地址")
    private String returnUrl;

    /**
     * 客户端IP
     */
    @Schema(description = "客户端IP")
    private String clientIp;

    /**
     * 订单标题
     */
    @Schema(description = "订单标题")
    private String subject;

    /**
     * 订单描述
     */
    @Schema(description = "订单描述")
    private String body;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;
}